package cn.huiyunche.base.service.exception;

import cn.huiyunche.tools.basic.exceptions.BusinessException;

public class CustomizeException extends BusinessException {

    private static final long serialVersionUID = 8650371453052079137L;

    public CustomizeException(Type type) {
        super(type.code, type.msg);
    }

    public CustomizeException(Throwable t, Type type) {
        super(t);
    }

    public enum Type {
        VEHICLE_NOT_HAS("10", "司机信息未认证!"),
        VEHICLE_CHECK_IN("20", "司机信息认证中!"),
        VEHICLE_NOT_PASS("30", "司机信息认证未通过!");

        private String code;
        private String msg;

        Type(String code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public String getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }

}
